import request from '@/utils/request.js'

// 查询模型列表
export function listAiModel(query) {
  return request({
    url: '/tool/aiModel/list',
    method: 'post',
    data: query
  })
}

export function listAiEnableModel(modelType) {
    return request({
        url: '/tool/aiModel/listAllEnable',
        method: 'post',
        data: {
            modelType
        }
    })
}

// 查询模型详细
export function getAiModel(id) {
  return request({
    url: '/tool/aiModel/detail/' + id,
    method: 'get'
  })
}

// 新增模型
export function addAiModel(data) {
  return request({
    url: '/tool/aiModel/save',
    method: 'post',
    data: data
  })
}

// 修改模型
export function updateAiModel(data) {
  return request({
    url: '/tool/aiModel/update',
    method: 'put',
    data: data
  })
}

// 删除模型
export function delAiModel(id) {
  return request({
    url: '/tool/aiModel/remove/' + id,
    method: 'delete'
  })
}
